/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.comut.crud.pojo.mobile;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author asantos
 */
@XmlRootElement( )
@XmlAccessorType(XmlAccessType.FIELD)
public class MobileUpdate  implements Serializable{
    
    
    private static final long serialVersionUID = 123534;
    //not updatable
    private int uid = -1;
    private Integer id_fleet = null;
    private Integer id_mobile = null;
    
    private boolean aliasFlag = false;
    private String alias = null;
    
    private boolean license_plateFlag = false;
    private String license_plate = null;
    
    private boolean serial_numberFlag = false;
    private String serial_number = null;
    
    //private String device_type = null;
    
    private boolean imeiFlag = false;
    private String imei = null;
    
    private boolean gsm_numberFlag = false;
    private String gsm_number = null;
    
    private boolean iccidFlag = false;
    private String iccid = null;
    
    private boolean equipment_typeFlag = false;
    private String equipment_type = null;
    
    //optional
    private boolean id_imageFlag = false;
    private String id_image = null;
    
    private boolean vehicle_typeFlag = false;
    private String vehicle_type = null;
    
    private boolean brandFlag = false;
    private String brand = null;
    
    private boolean modelFlag = false;
    private String model = null;
    
    private boolean ownerFlag = false;
    private String owner = null;
    
    private boolean fuel_error_coefficientFlag = false;
    private String fuel_error_coefficient = null;

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public boolean isAliasFlag() {
        return aliasFlag;
    }

    public void setAliasFlag(boolean aliasFlag) {
        this.aliasFlag = aliasFlag;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public boolean isBrandFlag() {
        return brandFlag;
    }

    public void setBrandFlag(boolean brandFlag) {
        this.brandFlag = brandFlag;
    }

    public String getEquipment_type() {
        return equipment_type;
    }

    public void setEquipment_type(String equipment_type) {
        this.equipment_type = equipment_type;
    }

    public boolean isEquipment_typeFlag() {
        return equipment_typeFlag;
    }

    public void setEquipment_typeFlag(boolean equipment_typeFlag) {
        this.equipment_typeFlag = equipment_typeFlag;
    }

    public String getFuel_error_coefficient() {
        return fuel_error_coefficient;
    }

    public void setFuel_error_coefficient(String fuel_error_coefficient) {
        this.fuel_error_coefficient = fuel_error_coefficient;
    }

    public boolean isFuel_error_coefficientFlag() {
        return fuel_error_coefficientFlag;
    }

    public void setFuel_error_coefficientFlag(boolean fuel_error_coefficientFlag) {
        this.fuel_error_coefficientFlag = fuel_error_coefficientFlag;
    }

    public String getGsm_number() {
        return gsm_number;
    }

    public void setGsm_number(String gsm_number) {
        this.gsm_number = gsm_number;
    }

    public boolean isGsm_numberFlag() {
        return gsm_numberFlag;
    }

    public void setGsm_numberFlag(boolean gsm_numberFlag) {
        this.gsm_numberFlag = gsm_numberFlag;
    }

    public String getIccid() {
        return iccid;
    }

    public void setIccid(String iccid) {
        this.iccid = iccid;
    }

    public boolean isIccidFlag() {
        return iccidFlag;
    }

    public void setIccidFlag(boolean iccidFlag) {
        this.iccidFlag = iccidFlag;
    }

    public Integer getId_fleet() {
        return id_fleet;
    }

    public void setId_fleet(Integer id_fleet) {
        this.id_fleet = id_fleet;
    }

    public String getId_image() {
        return id_image;
    }

    public void setId_image(String id_image) {
        this.id_image = id_image;
    }

    public boolean isId_imageFlag() {
        return id_imageFlag;
    }

    public void setId_imageFlag(boolean id_imageFlag) {
        this.id_imageFlag = id_imageFlag;
    }

    public Integer getId_mobile() {
        return id_mobile;
    }

    public void setId_mobile(Integer id_mobile) {
        this.id_mobile = id_mobile;
    }

    public String getImei() {
        return imei;
    }

    public void setImei(String imei) {
        this.imei = imei;
    }

    public boolean isImeiFlag() {
        return imeiFlag;
    }

    public void setImeiFlag(boolean imeiFlag) {
        this.imeiFlag = imeiFlag;
    }

    public String getLicense_plate() {
        return license_plate;
    }

    public void setLicense_plate(String license_plate) {
        this.license_plate = license_plate;
    }

    public boolean isLicense_plateFlag() {
        return license_plateFlag;
    }

    public void setLicense_plateFlag(boolean license_plateFlag) {
        this.license_plateFlag = license_plateFlag;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public boolean isModelFlag() {
        return modelFlag;
    }

    public void setModelFlag(boolean modelFlag) {
        this.modelFlag = modelFlag;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public boolean isOwnerFlag() {
        return ownerFlag;
    }

    public void setOwnerFlag(boolean ownerFlag) {
        this.ownerFlag = ownerFlag;
    }

    public String getSerial_number() {
        return serial_number;
    }

    public void setSerial_number(String serial_number) {
        this.serial_number = serial_number;
    }

    public boolean isSerial_numberFlag() {
        return serial_numberFlag;
    }

    public void setSerial_numberFlag(boolean serial_numberFlag) {
        this.serial_numberFlag = serial_numberFlag;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getVehicle_type() {
        return vehicle_type;
    }

    public void setVehicle_type(String vehicle_type) {
        this.vehicle_type = vehicle_type;
    }

    public boolean isVehicle_typeFlag() {
        return vehicle_typeFlag;
    }
    

    public void setVehicle_typeFlag(boolean vehicle_typeFlag) {
        this.vehicle_typeFlag = vehicle_typeFlag;
    }
    
    
    
    public boolean isToUpdateConexaMobile(){
        return isAliasFlag() || isId_imageFlag();
    }
    
    public boolean isToUpdateConexaConf(){
        return isSerial_numberFlag();
    }
    
    public boolean isToUpdateConexaDevice(){
        return isGsm_numberFlag() || isImeiFlag();                
    }
        
    public boolean isToUpdateConexaPhpMobileInfo(){
        return isLicense_plateFlag() || isIccidFlag() || isVehicle_typeFlag() || isBrandFlag() || isModelFlag() || isOwnerFlag() || isFuel_error_coefficientFlag();
    }
    
    
    public boolean isToUpdateComutDevMobile(){
        return isAliasFlag();
    }
    
    
    public boolean isToUpdateComutDevDevice(){
        return isGsm_numberFlag() || isImeiFlag();                
    }
    
    
    public boolean isToUpdateComutDevConf(){
        return isEquipment_typeFlag() || isSerial_numberFlag() || isLicense_plateFlag() || isBrandFlag() || isModelFlag() || isFuel_error_coefficientFlag();
    }
    
    
}

